package main

import "fmt"

func reverse(opsite string) string {
	reverse_str := ""
	for _, need_reverse_char := range opsite {
		reverse_str = string(need_reverse_char) + reverse_str
	}
	return reverse_str
}

func judge(readdaer string) bool {
	need_judge := reverse(readdaer)
	if need_judge == readdaer {
		return true
	} else {
		return false
	}
}

func main() {
	str1 := "上海人在人海上"
	str2 := "上海人不在海上"
	reversed_str1 := reverse(str1)
	reversed_str2 := reverse(str2)

	fmt.Println(reversed_str1)
	fmt.Println(reversed_str2)

	fmt.Println(judge(str1), "じゃ！")
	fmt.Println(judge(str2), "いやじゃ！")

}
